using System.Collections;
using NodeCanvas.Variables;

namespace NodeCanvas.Actions
{
	public class ITweenMove : ITweenActions
	{
		public enum MoveType
		{
			MoveTo = 0,
			MoveFrom = 1
		}

		public MoveType moveType;

		public BBVector targetPosition;

		private Hashtable hash;

		protected override string info
		{
			get
			{
				return "Tween " + moveType.ToString() + targetPosition;
			}
		}

		protected override void OnExecute()
		{
			hash = iTween.Hash("position", targetPosition.value, "name", id.value, "delay", delay.value, "time", time.value, "easetype", easeType);
			if (moveType == MoveType.MoveTo)
			{
				iTween.MoveTo(base.agent.gameObject, hash);
			}
			else
			{
				iTween.MoveFrom(base.agent.gameObject, hash);
			}
			base.OnExecute();
		}
	}
}
